import { Application } from "pixi.js"
import { stage } from "./config";
export const game = new Application({
    width: stage.width,
    height: stage.height,
})
game.renderer.view.style.position = 'absolute';
game.renderer.view.style.display = 'block';
game.renderer.autoResize = true;
// game.renderer.resize(window.innerWidth, window.innerHeight);
window.onresize = function() {
    var w = window.innerWidth;
    w = w > 900 ? 900 : w < 600 ? 600 : w
    var scale = w / stage.width;
    var h = scale * stage.height;
    game.renderer.resize(w, h);
    game.stage.scale = {
        x: scale,
        y: scale
    }
}
document.body.append(game.view);
export function getRootContainer() {
    return game.stage;
}